package yagwl.client.view.demo;

import yagwl.client.widget.FormField;

import com.google.gwt.user.client.ui.TextBox;

/**
 * Encapsulates address fields
 */
public class AddressFields {
  private TextBox addr1TB = new TextBox();
  private TextBox addr2TB = new TextBox();
  private TextBox cityTB = new TextBox();
  private TextBox stateTB = new TextBox();
  private TextBox zipTB = new TextBox();
  private FormField addr1FF = new FormField();
  private FormField addr2FF = new FormField();
  private FormField cityFF = new FormField();
  private FormField stateFF = new FormField();
  private FormField zipFF = new FormField();

  public AddressFields() {
    addr1FF = new FormField().setLabel("Address").setDataWidget(addr1TB);
    addr2FF = new FormField().setDataWidget(addr2TB);
    cityFF = new FormField().setLabel("City").setDataWidget(cityTB);
    stateFF = new FormField().setLabel("State").setDataWidget(stateTB);
    zipFF = new FormField().setLabel("Zip").setDataWidget(zipTB);
  }

  public TextBox getAddr1TB() {
    return addr1TB;
  }

  public TextBox getAddr2TB() {
    return addr2TB;
  }

  public TextBox getCityTB() {
    return cityTB;
  }

  public TextBox getStateTB() {
    return stateTB;
  }

  public TextBox getZipTB() {
    return zipTB;
  }

  public FormField getAddr1FF() {
    return addr1FF;
  }

  public FormField getAddr2FF() {
    return addr2FF;
  }

  public FormField getCityFF() {
    return cityFF;
  }

  public FormField getStateFF() {
    return stateFF;
  }

  public FormField getZipFF() {
    return zipFF;
  }

}
